chasing a logic error that was actually a data error