Issue #175 - Fix bugs