add canvas check