Code fixes

just more fixes
Merge pull request #6 from UberLame/master

Code fixes