Resolve syntax errors

Accidental duplicate code