corrected bug with reverse read