fixed broken tests and isnew logic