added tests for smarty and worked around a small bug

fixes #2265