Added width/height autodetection.