Added error dialogs for missing fields and casting errors (which should never happen)