[Bug Fix] Small fixes for API / CommandUtil.