Fixed issues in DBHandler