Fixing issues 170 and 168