anonymous classes printing fix