fixed a bug where the userId can be undefined