Fixed #8 and #7