Category sorting + popover bugfix

@spencereldred