Fixed Database Problems