fixed broken unit and functional tests