Bug fixes.
Merge pull request #32 from kylerush/bugfixes

Bug fixes.