Fix a test example.
Fix allocations in weakform library.