Handle main panel width correctly