Fixed issues with FunctionalTest