Fix dialog and dropdown display bug