Fixed #42 and #41