Bubble sort algorithm fixed