Remove and fix metadata