Fixed issue #1, #2