Found and fixed a major bug in the is_straddling function