fix setWidth bug