fixed read() in pophod script