Fix for session capitalization issue. Needs testing.