diff --git a/configure b/configure
index 483f73a6b916efc63cb8ac5304fd231f3c8d98cb..55b4e4ab3796e7c2929c24ac601f9200bbce2f69 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for sextractor 2.18.8.
+# Generated by GNU Autoconf 2.69 for sextractor 2.18.9.
 #
 # Report bugs to <bertin@iap.fr>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='sextractor'
 PACKAGE_TARNAME='sextractor'
-PACKAGE_VERSION='2.18.8'
-PACKAGE_STRING='sextractor 2.18.8'
+PACKAGE_VERSION='2.18.9'
+PACKAGE_STRING='sextractor 2.18.9'
 PACKAGE_BUGREPORT='bertin@iap.fr'
 PACKAGE_URL=''
 
@@ -1344,7 +1344,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures sextractor 2.18.8 to adapt to many kinds of systems.
+\`configure' configures sextractor 2.18.9 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1414,7 +1414,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of sextractor 2.18.8:";;
+     short | recursive ) echo "Configuration of sextractor 2.18.9:";;
    esac
   cat <<\_ACEOF
 
@@ -1546,7 +1546,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-sextractor configure 2.18.8
+sextractor configure 2.18.9
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1969,7 +1969,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by sextractor $as_me 2.18.8, which was
+It was created by sextractor $as_me 2.18.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2783,7 +2783,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='sextractor'
- VERSION='2.18.8'
+ VERSION='2.18.9'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -15656,7 +15656,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by sextractor $as_me 2.18.8, which was
+This file was extended by sextractor $as_me 2.18.9, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -15722,7 +15722,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-sextractor config.status 2.18.8
+sextractor config.status 2.18.9
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index e6c2f85dd8ee4275900a3bc02690575dd980c96a..8b33adcf461f34a7979e5395d88b990e263558fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@
 #	You should have received a copy of the GNU General Public License
 #	along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
 #
-#	Last modified:		03/04/2013
+#	Last modified:		05/04/2013
 #
 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -31,7 +31,7 @@ define([AC_CACHE_LOAD],)
 define([AC_CACHE_SAVE],)
 
 # This is your standard Bertin source code...
-AC_INIT(sextractor, 2.18.8, [bertin@iap.fr])
+AC_INIT(sextractor, 2.18.9, [bertin@iap.fr])
 AC_CONFIG_SRCDIR(src/makeit.c)
 AC_CONFIG_AUX_DIR(autoconf)
 AC_CONFIG_HEADERS(config.h)
diff --git a/man/sex.1 b/man/sex.1
index bd736e5378f87d9ad74af0a858d38a1a7048bd4a..aae412c07d884da27e05eb89fb0c3f68af90990a 100644
--- a/man/sex.1
+++ b/man/sex.1
@@ -1,4 +1,4 @@
-.TH SEXTRACTOR "1" "April 2013" "SExtractor 2.18.8" "User Commands"
+.TH SEXTRACTOR "1" "April 2013" "SExtractor 2.18.9" "User Commands"
 .SH NAME
 sex \- extract a source catalogue from an astronomical FITS image
 .SH SYNOPSIS
diff --git a/src/profit.c b/src/profit.c
index 1e41119a7321303683bc85ec3b905f30a377f465..90cf2937a7daca354bd891fe1067f7aa5ce53d43 100644
--- a/src/profit.c
+++ b/src/profit.c
@@ -22,7 +22,7 @@
 *	You should have received a copy of the GNU General Public License
 *	along with SExtractor. If not, see <http://www.gnu.org/licenses/>.
 *
-*	Last modified:		16/02/2013
+*	Last modified:		05/04/2013
 *
 *%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
@@ -168,7 +168,7 @@ OUTPUT	Pointer to an allocated fit structure (containing details about the
 	fit).
 NOTES	It is a modified version of the lm_minimize() of lmfit.
 AUTHOR	E. Bertin (IAP)
-VERSION	26/02/2013
+VERSION	05/04/2013
  ***/
 void	profit_fit(profitstruct *profit,
 		picstruct *field, picstruct *wfield,
@@ -396,7 +396,14 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
       if (list[i] && flux_flag[i] && i!= PARAM_SPHEROID_FLUX)
         param[index[i]] = 0.0;
     profit_residuals(profit,field,wfield, 0.0, param, NULL);
-    addcheck(check, profit->lmodpix, profit->objnaxisn[0],profit->objnaxisn[1],
+    if (profit->subsamp>1.0)
+      addcheck_resample(check, profit->lmodpix,
+		profit->objnaxisn[0],profit->objnaxisn[1],
+		profit->ix,profit->iy, 1.0/profit->subsamp,
+		1.0/(profit->subsamp*profit->subsamp));
+    else
+      addcheck(check, profit->lmodpix,
+		profit->objnaxisn[0],profit->objnaxisn[1],
 		profit->ix,profit->iy, 1.0);
     }
   if ((check = prefs.check[CHECK_SUBSPHEROIDS]))
@@ -410,7 +417,14 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
       if (list[i] && flux_flag[i] && i!= PARAM_SPHEROID_FLUX)
         param[index[i]] = 0.0;
     profit_residuals(profit,field,wfield, 0.0, param, NULL);
-    addcheck(check, profit->lmodpix, profit->objnaxisn[0],profit->objnaxisn[1],
+    if (profit->subsamp>1.0)
+      addcheck_resample(check, profit->lmodpix,
+		profit->objnaxisn[0],profit->objnaxisn[1],
+		profit->ix,profit->iy, 1.0/profit->subsamp,
+		-1.0/(profit->subsamp*profit->subsamp));
+    else
+      addcheck(check, profit->lmodpix,
+		profit->objnaxisn[0],profit->objnaxisn[1],
 		profit->ix,profit->iy, -1.0);
     }
   if ((check = prefs.check[CHECK_DISKS]))
@@ -424,7 +438,14 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
       if (list[i] && flux_flag[i] && i!= PARAM_DISK_FLUX)
         param[index[i]] = 0.0;
     profit_residuals(profit,field,wfield, 0.0, param, NULL);
-    addcheck(check, profit->lmodpix, profit->objnaxisn[0],profit->objnaxisn[1],
+    if (profit->subsamp>1.0)
+      addcheck_resample(check, profit->lmodpix,
+		profit->objnaxisn[0],profit->objnaxisn[1],
+		profit->ix,profit->iy, 1.0/profit->subsamp,
+		1.0/(profit->subsamp*profit->subsamp));
+    else
+      addcheck(check, profit->lmodpix,
+		profit->objnaxisn[0],profit->objnaxisn[1],
 		profit->ix,profit->iy, 1.0);
     }
   if ((check = prefs.check[CHECK_SUBDISKS]))
@@ -438,7 +459,14 @@ profit->niter = profit_minimize(profit, PROFIT_MAXITER);
       if (list[i] && flux_flag[i] && i!= PARAM_DISK_FLUX)
         param[index[i]] = 0.0;
     profit_residuals(profit,field,wfield, 0.0, param, NULL);
-    addcheck(check, profit->lmodpix, profit->objnaxisn[0],profit->objnaxisn[1],
+    if (profit->subsamp>1.0)
+      addcheck_resample(check, profit->lmodpix,
+		profit->objnaxisn[0],profit->objnaxisn[1],
+		profit->ix,profit->iy, 1.0/profit->subsamp,
+		-1.0/(profit->subsamp*profit->subsamp));
+    else
+      addcheck(check, profit->lmodpix,
+		profit->objnaxisn[0],profit->objnaxisn[1],
 		profit->ix,profit->iy, -1.0);
     }