Rework issue #305