Picking first image by default from lif, and fixed problem if lif had been opened before