Fix by @mikenovikov for #129