Fix bug of selecting wrong columns from samples so the paths were incorrect.