fixed some issues with subclass