fixing random bugs in merge