This Fixes #1045

@gordonwoodhull Please review.