Fixed an issue with width detection