fixed crash bug for some graphics configurations with global border