Fixed bug, which made losing impossible, if only 1 no-mine tile was left. You were winning, independent of whether you click on mine or not.
Also fixed initializing and resetting bugs in counters and gameboard.