Miner fix in selection sort