Fixed close button hide

When clicking on main content close buttons will now properly hide as
well.