Updated PR #355 based on feedback