fixed issue with order of types