Ensure that sessions are released after upload_bytes