remove legacy hook query alter