fix index sample program