title: attempt to call method 'insert' (a nil value) when i restart game
body: <p>I've added objects to the group so they get deleted and respawn when the game restarts but when the game restarts it gives the following error "attempt to call method 'insert' (a nil value)"</p>
  
  <p>This is my object code:</p>
  
  <pre><code>local function spawnObject()
      local objIdx = mRandom(#objects)
      objName = objects[objIdx]
  
      object = display.newImage( "images/fruit_" .. objName .. "_100.png" )
  
      object.x = mRandom(screenLeft+30, screenRight-30)
      object.y = screenTop
      object.rotation = mRandom(-15, 15)
      object.id = mRandom(-15,15)
  
      group:insert( object )
  
      if objIdx &lt; 4 then
          object.type = "food"
      else
          object.type = "other"
      end
  
      physics.addBody(object, "dynamic",{radius=45 , bounce = bt})
      grassfront320w:toFront()
      object.collision = objectCollision
      object:addEventListener( "collision", object )
  end
  </code></pre>
  
  <p>And for restarting I go to restart scene which I've created and from there I go back to my play scene.</p>
  
  <p>Please help me solve the problem.</p>