Issue #15 and #14 fixed