changed the order of command matches so del/res are handled before a lookup