Fixed problems with functional tests