Fixing the global index in the take piture