fixed bug in bubblesort