Bugfix ordering when classes inheritence is used