Changed substitution to ignore errors