potential fields bug fix and prevention from accessing field values that are out of range