added check for local indices before attempting to set status