First pass at 3.9 compat