update metadata size. clean up.