fixed error on empty metadata attribute