fixing a bug in lambda -lifting and adding fof output