Fixed syntax error caused by the try/catch