the js exception handling was causing errors in webkit browsers