#87 - error fixed after refactoring