Fixed bug with PR #3.