Added win counter
 - Also cleaned line breaks
 - And added safety check