Fixing sorting
Casting in list