exception handling to avoid caching problem.