Issue #188 - fixing bugs