Fixing one of the bugs reported in #147