Fixed issue with type ordering