fixes masked logic for visualize_images
fixes boolean rescale
fixes aam visualization