Fixed the counter
Added isNaN if-statement and randomized secret