Fixed CloseForm to handle instant closure.  Bug fix