fixed a bug where form would not reset