fix potential width calculator fail