Fixed permissions
Bug fixes