various syntax errors fixed