form should be outside table and close form was twice