Fixed dialog bug