Added broader support for grayscale map