Fix for #2981