Fixed mistakes
Fixed bugs
Fixed mistakes
Merge pull request #217 from JimmDiGrizli/master

Fixed some mistakes and bugs