fix check_requirements.sh bugs