Fixed ClassVisitor so there is no null pointer exception.