fix rect global bug