Fix error on generating activity page when there is no activity