Use to_real in more places