Problem fixed in query