Fixed AI-target selection and attempted table update