bug fix of likeQueryMaker function