fixed KeyboardInterrupt bug when listing snippets