fix index problem