ExternalSort class variable was being erroneously used and messing up the sorting mechanism