Merge PR #548 and #549