Fix for reloading environment and creating object