Fix zero length error in test