added some fix to the functional test