Fix bug in activity.