Fix snapshotID type, use correct db version in main
Fix unusedMachine search