You may have a double-quote issue as well - check all your quoted strings (especially the ones in IF statements) to make sure they're all properly closed-off.