Fixed failing unit test on some platforms