Bugfixes: Catch bad incoming content and broken sessions.