resolve various syntax errors