Avoid IndexError

This is not a fix for #34. This merely avoids a crash.