fix bug on first sing-in