Fix several metadata errors