Attempt at fixing the Mac window centering problem