fixed a bug that would make pictures disappear