Fixed #5 and #9