Fixed bubble sort to stop once a pass completes with no swaps