merge code fixes