fixed more merge bugs