Fixing stuff with sort