Fixed probles in tests and the Manager engine