Add fix to 1st code block + cmd implementation