canvas history array seems to be implemented with out error. I did however, forget to clear the array out of its 10 undefined elements at the initialization of ctpaint. I added that (ten array.shift()s)