Bug fixes and permissions added