Reverted removal of type from the returnMap