fix bug in image resource