Attempt at fixing endless dialog loop