add -RN and -Rns, handle empty -Ss query properly.