clean ZSH errors detection, fix #1665