fix small bug in dropping metadata