Fixed Database Bug