improved error handling in case of getting metadata for the first time