query and options were not defined. Fixed #19