minor bug fixes and layout tweak