fix randomly failing test