Replace some bugs