Fixed error when field is nil