fixed redirection if error uploading