fixing bug with PixelWidth and PixelHeigth