bug fixes part 1