bug in format() index