Fixed permissions issue on purge