Fixed some functional test errors

Signed-off-by: Jeremy Ho <jujaga@gmail.com>