fix rect bug