Fixes issue #419

Also updates some permissions.