Fixed a reference issue with drawing window borders.