fixed sorting in transactions