patches for issue #96