fixed sort popup, refectored buttons