part of #264 fix