fixed form creation bug