fixed smarty's if(...)