Fix remaining permissions issues and crashes.