Updated patch at #14 looks good to me.