Fixed broken tests & debugging