Made win condition work properly