some fixes on request and session_regenerate_id