fixed merge code