More bug-fixing for lf example.