Fixed issues with display function from OpenCV samples