Merge "Correct handling of journal mode changes"