Fixing release build and permission issues.