Found an error while copying a class. Cannot instantiate an abstract class