fixed all known bugs.