Merge pull request #5 from hulkholden/master

Fix for a nasty memory corruption bug
Real fix for the memory smash - wrong struct used
Merge remote-tracking branch 'upstream/master'