validate.sh fixes