fix width check