Completed github issue #6