Fix index check when adding new camera