fix index reference