fix anonymous class issue