aleviating regression in issue #26.

should fix it, but there might be corner cases.
update gitignore