intermediate commit: two bug fixes and a hack
Merge pull request #19 from roeitell/dev

intermediate commit: two bug fixes and a hack