Fixed the problem where images were being appended also when filter was changed.