Fix problem when erasing and saving

When using the erase button the line would be erased visually, but it wouldn't update the array with the strokes.