Re-enable the unit tests and fix