Fix for #2511