Fix #25

Is this a good fix for #25 @mlubin @joehuchette ?