Fix activity register bug