fixing bugs