[FIX] small bug: incorrect call of read that was causing traceback