Fix type ordering assumptions