Avoid opencv bug.