Dialog and focus improvements