adding error handler for FF