quick fix some bugs