slightly reduced memory consumption for some cases