Merge #588 manually