Fixes issues #41 and #42.
Fixes issues #41 and #42.