Fix bug in overridden method