Query evaluation fixed