Change class name and fix query not set bug