It would be fine to remove this optimization if you like. the first line change is necessary though for the syntax error fix.