fixed error in using findContours