Used abersnaze's patch to fix the unit test