Issue #56: fix possible over-read