Fixes for gray map and map type.