use modified patch from GitHub pull request