Query command update

fixes #1