Made all functions only accept sage integers to hopefully fix a strange bug