Fixed permission-related issues