fixing bugs everywhere