Fixed critical failure in TMWindow class