fixed sort in server.js