Oversight errors of imperial officials

I found a bug. When the building under supervision by the imperial official was deleted, the imperial official still maintained the state of supervision and did not return to a free state. This is only a bit annoying, but it should be easy to fix this error, please confirm .