Add new test, fix copy functions