fixed query for client record