Merged with jphalip's latest (but old) release