added method to show dialog allowing stateloss