fixed restart bug due to incorrect permissions