More changes
In particular this fixes a silly error in the code for checking what manager we run one.
It also seems like we didn't free resources in some cases.
In particular this fixes a silly error in the code for checking what manager we run one.
It also seems like we didn't free resources in some cases.