Fixing auth: number of parameters didn't match query