Fix problem with getWidth