Added dispatch handler for commands