fixing bugs.