Fixed database NA issue and added more fields to the dialog for adding entries