Fixed wrong query