fixed some bugs with toggling docked forms.