Fix mismatch of selected history entry and shown state.
Add handling of canceled builds.