Fix cut-and-paste problem