fixed error with bubble sort