Change initialize to on_connect.