fix issue #22 @brianr