Fixed declaring winner logic