Fixing a Syntax Error with Error Handling