fixed stop at last image. fixed animation