Fixed bug in monitoring finished fsms.
Improved pooling code.