bugfix: initialize "world" to NULL to avoid destruction of invalid pointer