fix cut-then-paste with imports