Issue #165 - Fixing bugs