Fixed bug wih form factory