Fix for #15, thanks to @LarsDol for this.