Fix a bug in SetWindowIconVisibility  method