smarty 3 workaround