fixed up metadata decode