Fixed some bugs
Merge pull request #20 from viperchris3/work

Fixed some bugs