Window centering bug fixed