reopen option, fix paste bug