The code in post #24 is fixed.