Fix smarty bug