Fixed error when displaying form