some fixes if used behind a caching reverse proxy