Fixed a bug where the size wasn't set properly when the orientation changed.