Bug fix: log doesn't submit after the first submit