added test for zero-length term - hoping to fix AIOOBE