fixed a bug where history was not cleared when a new picture was initialized