fixed error from pats upload code