api: fix record removal