Fix for #14 as reported and fixed by @jnik.

Pull request. Code review request to @RandalliLama