remove trailing comma from query. jump to query token. added test.