fix handling of empty structs