fixed generate dialog