Fixed weird merge bugs.