Fix by using -z and $