Resolved issue #13 and issue #32