fix #222

I had the same issue as described in #222, at least for zsh. This seems to fix it so far. I gave it a shot with bash, and no error message there.