fix loading classes bug