Preliminary gallery work - why is the form throwing a type exception?