Fixed Database problem