Bug fixes and layout update