fix null pointer when replacing backreferences
Merge remote-tracking branch 'origin/master'