fixed exception when indexes does not exist.