fixed index for deletion