* fix nil map error when using plugin headers in legacy format * create map on demand * better initialization