various smarty3 fixes