Update canvas init function