Fixed issues with the dialog system.