Fixed problem with saving factors