some bug fixes
Merge pull request #7 from wisehermit/develop

some bug fixes