Changed the way to check which field it is.