Added support to correctly update image numbers when deselecting "lower" numbers.

Signed-off-by: Esteban Torres <me@estebantorr.es>