Bug fix.
Merged with ui upstream.