merge wojtekn-fix_removing_elements changes