fix appointment order