added safeguard against illogical inheritance