Apply @olance's patch