Fixes for issue #24

Here is a pull request with changes/fixes for issue #24. I am new using Git and especially GitHub, so let me know if there is something I should be doing differently.