fix some bugs and add listen web state