Stupid string substitution bug