coredump by duplicate variables fixed
Merge pull request #3 from duhoobo/master

"Segmentation fault" caused by duplicate variable names. Fixes #3 and #2