tpl driver compatibility bugfix for php 5.3