Fixed bug in layerNames that caused them to return a list of empty strings.