fix pre merge bugs