index id not working properly