fix from @ljbade for #18