I have added another pull request #27 , which should take care of this bug following the implementation that Bob proposed. Please let me know if that works and I can close both of these requests.

Thanks.