fixed ordering problem