fix removing of element