tweaks to handle corner cases properly, avoid reads being double captured