fix sql error which prevents remote login from working