fixed last image display bug