Fixed the bug with images not disappearing