fixed all bugs.