Fix for issue #22

Pull request as asked