Bug fixes part 3