fix for exception while closing window in Colors