Fixed issue #28 - thanks to @scottharvey