fixed broken tests & couple more problems