Rev 405 changes:

Fixed:
* A lot of lua errors what happens in some random cases.
* Some compatibility fixes for workshop addons.