fix bugs and test publish read