fixed all known bugs