bug fix for oh-my-zsh

when I use this script in oh-my-zsh, it will raise an error, so I modified it..