Fixed error handling in case of invalid indexes internal data