fixing fatal when trying to instantiate an abstract class directly