fix cannot-copy bugs