Fixed weird query