fix for setting width and height. fix for metadata.