fixed remove_by_id function in basemodel.py