fixed upload permissions, fixed #234