added error catching to shore up js vulnerability