Fixed issues #42 and #43