fixed some bugs
Merge pull request #4 from defcronyke/master

fixed "market" variable bug (and some others)