Fixed upload and removed potential error