layout fixes and bugs