Fixed bug with upload permissions