Added handling of multiple worlds.