Oh man, I'm gonna have to figure out how that happened, any clues like what wave you were on or if you were in the middle of building or something?
I think it was around wave 5ish? I was down to very few enemies before it happened. You may just need to check if remaining is <= 0 just in case it goes under 0 somehow. I'm afraid I can't give much more info than that.. It was kinda random