really fixed sorting this time