fix syntax and lint errors