fixed bug with undocking with only one form.