Fixed sorting wrong variable name