Minor bugfix

When user paused and resumed the canvas was cleared due to var firsttime
not being set to 0.