Fixing #3, *Canvas should have been passed by reference from the beginning.