fix registered commands during init, add test