fix bug in ImageRenderer