Fix bug (reset matrix before add new image)