session and cache fix