Merge pull request #50 from tochman/fixes