Tweaked the command handler