fix width issue in canvas