fixed ordering error with messages