Merge smarty fix

Fix for #225