Hi David,
from you post I assume that you tested it with Oracle. I have created the templates for Oracle without ever being able to test it, since I don't have an Oracle installation.
I already thought that it might break here and there since I was only able to deduce how the code should look like.
Please let me know if you find a fix, I will change the template to accordingly.
Greetings,
Nima