fix query and form