Merge smarty fix