Fixed the script to not break on scp