SQL fixes
Merge branch 'master' of https://github.com/Atom-Network/ATN-Core