Fix bug while no canvastype is given