applicationCache fix. Better error handling.