Add try/catch block to prevent browser from crashing - fixes #57