fixing errors with how we access metadata