Add beforeRemove