Fixed syntax errors in update code