Fixed permissions bug caused by b12f509d70a7409e7d7343ba9bf3bd0846fff78e