Fix for a bug in an older task that caused compilation warnings when compiling with -O3