Fixed remaining merge bugs