Fixes the issue with the wrong value of the invite dialog.(reported by Timmi)