Fixed issues #5, #7 and #9.