Fix memory related crash. sizeof() returns 24 and the actual number of settings is 2.
Merge pull request #6 from christophercotton/master

Fix memory related crash.