save bug fix for multiple iterations (save only once)