fixed error with IN query