fix bug in image hack