try moving your form reset to after the window is shown.