Fix for index error in well data processing