Fix for #4947