Slight fix to canvas resizing.