fixed mixing up width/height bug