SIO-1454 Fix database bugs in SubmitsQueue

Change-Id: I5311a8707d6a0eb8c7c13c6bf1ff68e79e1155d0
Merge "SIO-1454 Fix database bugs in SubmitsQueue"