Fix removing of unwanted key/value pairs, like id