Added with_lockmode('update') to prevent race
Merge branch 'transaction' of https://github.com/Cerberus98/quark into transaction
fixed subnet instead of dict