fix part of query