Merge "Fix region leaks after testing endpoints"