Fixed nullpointer when retrieving global variable from ClassNode.
Changed called to be true if main method.