Weird values from an int function