Fix logon SQL