fixed some DB inconsistencies