Fixed a lock conflict when publishing events
Some bug fixes affecting the console script