fix bugs in ff