fix bug that affects anonymous users