Fixes merge functionality