fixing bugs
Issue #164 - fixing bugs