If this only happens with polkit dialog, I think it's problem of gnome-shell's polkit dialog instead of terminal, I remember I saw a similar bug, but I need to search for it...