Fix bug where win is not registered