fixing issue #24