Add substitution rule to walkInt and add error handling