changed how registerActivity is called