remove trailing "n" in query