fix merging corner case during error