Fixed bug with abs (for int vs for double)