fix syntax errors in dictionary