fixing img popup bug