fix variable in query controller