fixed bug in agent local database structure check