Added a fix for issue #24