some fixes
Merge pull request #57 from miekg/fixes

some fixes