Backport #291 into 2.0.5 release