Minor changes on register_with_index decorator.