Fix for smarty extension

See #315.