fixed read buffer issues, readbuffer needs internal cleanup