Fix for #2046