Cannot call copy constructor of static class