Fixed off-by-one in k_cmd-read