Fix canvas initialization