Smarty errors fixes