fixed issue with F calculation