Copy PR #97 from original repo