Fix issue #23
Fix issue #24