The logic is correct. Did you emulate the buffers as recommended in my previous post?