Fix so that functionality remains backwards compat and tests pass