fixing js timer