Revert manifest changes that broke title bar hide, add safety checks to JNI