Fixed inheritance issues. thanks @admsyn