Fixed type being empty in special cases.