Fix events and fix bug about errors...