Simple bug fixes

One bug fix and one more gitignore.