Fix ObjectId casting bug in get_one and delete_action