adding try/catch to JSON.parse(). fixes #2