fix broken rnd
fix outdated functional tests