layout and metrics fixes