memory related fixes for annotation color and accessibility array defensive check