fixed sorting (closes #28)