Fixed Database issue