fixed sort in MOAILayer