Set the size of the weight/trace vectors properly.
Merged changes