Since $width has to be odd, make sure it is.