fix problem with ImageAnnotation
fix deprecation warnings