improved thread safety for Imager