Fix syntax and name errors