Fix #8: add index argument in formatter function.