Fixed bug in abstract class