fix issue #20 @brianr