permissions and bug fixes