Fixed the fto function