was reading bytes twice