Removed start-end inversion logic