Fixed autosizing bugs.