Fixed unit tests for 5.x