Database inconsistancy fix