Minor bug and layout fixes