Changed primitive type resolution to come first.