Fixed Database Nil Issue