fix unbound variable bug if command/module context unset.