Changes in contours2ucm to make it work