db bug fixed