Resolved issue #48 and #42