Fix Undefined bug generating new Kanvas