Try to fix test errors because of undefined array index