diff --git a/compiler/frontend/builtins/jet/Any.kotlin_class b/compiler/frontend/builtins/jet/Any.kotlin_class
index f94e86d430f..26522767ab1 100644
--- a/compiler/frontend/builtins/jet/Any.kotlin_class
+++ b/compiler/frontend/builtins/jet/Any.kotlin_class
@@ -1,3 +1,2 @@
- 2
-RÆ0B
+ RÆ0B
 
\ No newline at end of file
diff --git a/compiler/frontend/builtins/jet/Nothing.kotlin_class b/compiler/frontend/builtins/jet/Nothing.kotlin_class
index 7510be6ae4e..a3c038ba10f 100644
--- a/compiler/frontend/builtins/jet/Nothing.kotlin_class
+++ b/compiler/frontend/builtins/jet/Nothing.kotlin_class
@@ -1,3 +1,2 @@
- Ç2
-RÂ0B
+ ÇRÂ0B
 r
\ No newline at end of file
diff --git a/compiler/frontend/serialization/src/org/jetbrains/jet/descriptors/serialization/DescriptorSerializer.java b/compiler/frontend/serialization/src/org/jetbrains/jet/descriptors/serialization/DescriptorSerializer.java
index 8425d51427b..8a6eb2ea9c8 100644
--- a/compiler/frontend/serialization/src/org/jetbrains/jet/descriptors/serialization/DescriptorSerializer.java
+++ b/compiler/frontend/serialization/src/org/jetbrains/jet/descriptors/serialization/DescriptorSerializer.java
@@ -16,6 +16,8 @@
 
 package org.jetbrains.jet.descriptors.serialization;
 
+import com.google.common.base.Predicate;
+import com.google.common.base.Predicates;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.jet.lang.descriptors.*;
 import org.jetbrains.jet.lang.descriptors.annotations.Annotated;
@@ -45,18 +47,24 @@ public class DescriptorSerializer {
     };
     private final NameTable nameTable;
     private final Interner<TypeParameterDescriptor> typeParameters;
+    private final Predicate<ClassDescriptor> isSpecial;
 
     public DescriptorSerializer(@NotNull NameTable.Namer namer) {
-        this(new NameTable(namer), new Interner<TypeParameterDescriptor>());
+        this(namer, Predicates.<ClassDescriptor>alwaysFalse());
     }
 
-    private DescriptorSerializer(NameTable nameTable, Interner<TypeParameterDescriptor> typeParameters) {
+    public DescriptorSerializer(@NotNull NameTable.Namer namer, @NotNull Predicate<ClassDescriptor> isSpecial) {
+        this(new NameTable(namer), new Interner<TypeParameterDescriptor>(), isSpecial);
+    }
+
+    private DescriptorSerializer(NameTable nameTable, Interner<TypeParameterDescriptor> typeParameters, Predicate<ClassDescriptor> isSpecial) {
         this.nameTable = nameTable;
         this.typeParameters = typeParameters;
+        this.isSpecial = isSpecial;
     }
 
     private DescriptorSerializer createChildSerializer() {
-        return new DescriptorSerializer(nameTable, new Interner<TypeParameterDescriptor>(typeParameters));
+        return new DescriptorSerializer(nameTable, new Interner<TypeParameterDescriptor>(typeParameters), Predicates.<ClassDescriptor>alwaysFalse());
     }
 
     @NotNull
@@ -82,8 +90,11 @@ public class DescriptorSerializer {
             builder.addTypeParameters(local.typeParameter(typeParameterDescriptor));
         }
 
-        for (JetType supertype : classDescriptor.getTypeConstructor().getSupertypes()) {
-            builder.addSupertypes(local.type(supertype));
+        if (!isSpecial.apply(classDescriptor)) {
+            // Special classes (Any, Nothing) have no supertypes
+            for (JetType supertype : classDescriptor.getTypeConstructor().getSupertypes()) {
+                builder.addSupertypes(local.type(supertype));
+            }
         }
 
         ConstructorDescriptor primaryConstructor = classDescriptor.getUnsubstitutedPrimaryConstructor();
diff --git a/generators/org/jetbrains/jet/generators/builtins/BuiltInsSerializer.java b/generators/org/jetbrains/jet/generators/builtins/BuiltInsSerializer.java
index a586531a06c..a38011fe0d9 100644
--- a/generators/org/jetbrains/jet/generators/builtins/BuiltInsSerializer.java
+++ b/generators/org/jetbrains/jet/generators/builtins/BuiltInsSerializer.java
@@ -1,5 +1,7 @@
 package org.jetbrains.jet.generators.builtins;
 
+import com.google.common.base.Predicate;
+import com.google.common.collect.ImmutableSet;
 import com.intellij.openapi.Disposable;
 import com.intellij.openapi.util.Disposer;
 import com.intellij.openapi.util.io.FileUtil;
@@ -53,7 +55,14 @@ public class BuiltInsSerializer {
             System.err.println("Could not make directories: " + destDir);
         }
 
-        final DescriptorSerializer serializer = new DescriptorSerializer(NameTable.Namer.DEFAULT);
+        final DescriptorSerializer serializer = new DescriptorSerializer(NameTable.Namer.DEFAULT, new Predicate<ClassDescriptor>() {
+            private final ImmutableSet<String> set = ImmutableSet.of("Any", "Nothing");
+
+            @Override
+            public boolean apply(ClassDescriptor classDescriptor) {
+                return set.contains(classDescriptor.getName().asString());
+            }
+        });
         ByteArrayOutputStream classNames = new ByteArrayOutputStream();
         final DataOutputStream data = new DataOutputStream(classNames);
         ClassSerializationUtil.serializeClasses(allDescriptors, ClassSerializationUtil.constantSerializer(serializer), new ClassSerializationUtil.Sink() {
