Index bug fixed