fixed all unit and functional tests