Fixing undefined variable fm in example