Fixed issues #8 and #11