returns non-zero, not -1

I'm changing the way bt gens code, so this needs fixin'. The unit tests were wrong anyway.