Fix and make definitly work the event mechanism