fix for reader cleanup