some nql clean up