fixed error that was happening for single named query