bug fixes and layout changes