Issue #41 code fixed