a few layout changes and crash fix