why do you need to wait before registering the events? Add a comment.