fix bugs part 1