v1.2.0: Fixed #6 and Fixed #4

Fixed issues #4 and #6. Also provided possible fix for issue #5.