Fix issue in obj->double conversion