My stories got carried into the new sprint and now my sprint history is messed up

Stories that are not marked as completed and deployed will be moved into the next sprint when the old sprint date has passed. After you mark them as complete/deployed, you can drag them from the current sprint into the old sprint on the Project Tools -> History page.