some fixes for functionality test