fixed DB issues