fix when closing and opening worlds