added another if to autonomous, trying to get rid of infinite loops