remove debug cruft
fix index data changing bug