Fixed powersources and added an event