Fix bug memory and sliding between picture