fixed issue with database sync