Bug fix and permanent storage of lastSubmitted date