size is not set correctly even though height and width are correct