Database class fixed