Fixes for session already defined error