Leak detection circuit