Fixed some permissions problems