work now with layers having empty metadata fiels