Fixed syntax errors caused by botched regex replace.