Added a copy to handle a segfault.