Fix for bug with previous image not shown.git