Attempts to fix resizing problems.