Adding back the lost fix for #1591