Fixed bugs with wrong events_history table name