Added hasOwnProperty check to the setupSwatch loop.