Add events for blueprint and fixed some bugs