Re-rolling patch from #6 to work with module version 2.1.0