AdaptiveControl: fixed bad memory access