code cleanup - fix for db innodb syncronization issue.