fixed empty index image query error