Update fre.py

minor changes in if conditions