Fixed bug with upload not detecting script status correctly