Fixed error in scaling and centering layout on screen.