modify the correct position variable when auto-hidden