Fixed canvas check code.