Resolving syntax error