small bug fixes
Merge pull request #6 from kouvelas/master

debugging done