Fix automerge bug