Fix entity order