Correct assignment of Type variable