Added more events to deal with asynchronicity.