Fix bugs  continued