Bind on_created event at class creation time to keep callback around