fixed sorting but with fit indices