fix bug in image plugin