Fix fatal error when 'debugmode' in simpleforms is enabled.