Fixed issue #5, Fixed issue #6