Fixed error in query.