Some floting math fixes