fixed sorting by type

problem was with dot as separator in the sort function. changed it to |