Issue #285 fix code