Get updated from original repo, version 3.1.6

Pull all the nice stuff patched in the original repository