Fix for issue #127 reported by @markrickert