fix for timer not hitting 0 and updated the JS