Fixing contours() so that models with the logth detection function will work.