Fixed all problems when running tests in 'fork' mode.