some fixes with smarty