Corrected misspelled variable causing error to appear when viewing record