Potential fix for bug mentioned in #2047