Fix a bug with update texture rect.