Moved click function to init