revised fix for Fixes https://github.com/rSmart/issues/issues/377