diff --git a/sis8300bcmApp/src/sis8300bcm.cpp b/sis8300bcmApp/src/sis8300bcm.cpp
index b7fc429c714f5b2f6d88291fa0b6691725014a9e..24339a8ff05621ec82e3e3271adb2752f99f7ba3 100644
--- a/sis8300bcmApp/src/sis8300bcm.cpp
+++ b/sis8300bcmApp/src/sis8300bcm.cpp
@@ -1275,9 +1275,8 @@ int sis8300bcm::deviceDone()
             // auto flat top start and end have been read-back before the start of acquisition
             getDoubleParam(addr, BCMAcctAutoFlatTopStart, &autoFlattopStart);
             getDoubleParam(addr, BCMAcctAutoFlatTopEnd, &autoFlattopEnd);
-            printf("auto flattop window = %f\n", triggerWidth - (autoFlattopStart + autoFlattopEnd)/10e6);
             // calculate the average current over automatic flattop (window in ms)
-            ret = sis8300drvbcm_get_channel_flattop_current(mDeviceHandle, addr, triggerWidth - (autoFlattopStart + autoFlattopEnd)/10e6, flattopCharge, &doubleValue);
+            ret = sis8300drvbcm_get_channel_flattop_current(mDeviceHandle, addr, triggerWidth - (autoFlattopStart/1e6) + (autoFlattopEnd/1e6), flattopCharge, &doubleValue);
             if (ret) {
                 asynPrintError(pasynUserSelf, "sis8300drvbcm_get_channel_flattop_current auto returned %d", ret);
                 return ret;